<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <base-layout>
      <p slot="header">标题信息</p>
      <p>主要内容</p>
      <p>主要内容</p>
      <p slot="footer">底部信息</p>

    </base-layout>
  </div>
  <script src="../vue.js"></script>
  <script>
    Vue.component('base-layout', {
      template: `
        <div>
          <header>
            <slot name='header'></slot>
          </header>
          <main>
            <slot></slot>
          </main>
          <footer>
            <slot name='footer'></slot>
          </footer>
        </div>
      `
    })

    var vm = new Vue({
      el: '#app',
      data: {

      },
      methods: {
        handle() {

        }
      }
    })
  </script>
</body>

</html>